//
//  TextDetailViewController.m
//  Happy Kitchen
//
//  Created by dlios on 15/3/8.
//  Copyright (c) 2015年 mac_chen. All rights reserved.
//

#import "TextDetailViewController.h"

@interface TextDetailViewController ()

@end

@implementation TextDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.myScorellView = [[TextDetailScorllView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.height, self.view.frame.size.height)];
    self.myScorellView.backgroundColor = [UIColor whiteColor];
    
    // 赋值
    [self.myScorellView setDiseaseDescribe:self.diseaseDescribe fitEat:self.fitEat lifeSuit:self.lifeSuit];
    
    //scorllView上的按钮
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(self.view.frame.size.width - 80, 40, 50, 30);
    
//    [button setImage:[UIImage imageNamed:@"Button_Stop_Pressed@2x.png"] forState:UIControlStateNormal];
    
    [button setTitle:@"返回" forState:UIControlStateNormal];
    [button setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
    [button setTitleColor:[UIColor lightGrayColor] forState:UIControlStateHighlighted];
    
    [button addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    
    
    [self.myScorellView addSubview:button];
    [self.view addSubview:self.myScorellView];
    
    
    
    

}

//模态回到列表页面
- (void)buttonAction:(UIButton *)button
{
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
